$(function(){
	
	
	//订购
	$("#order_read_detail_book").click(function(){
		var resType = $("#resType_detail_book").val();
		var culumnID = $("#culumnID_detail_book").val();
		var resID = $("#resID_detail_book").val();
		$.post("/ajax/operation/doOrderResources.action",{
			"resourcesId":resID,
			"resType":resType,
			"columnId":culumnID
		},function(value){
			if(value == "success"){
				common_a_div("订购成功！");
			}else if(value == "fail"){
				common_a_div("订购失败！请联系管理员！");
			}else{
				common_a_div(value);
			}
		});
	});
	
});


//图书列表加载更多
function loadMore_list_book(serverPath,pagesize,readlistbook_key){
	var currpage = $("#currPage_list_book_"+readlistbook_key).val();
	var columnID = $("#b_read_columnid_"+readlistbook_key).val();
	var allcount = $("#b_read_allcount_"+readlistbook_key).val(); 
	$.ajax({
        type: "post",
        dataType: "json",
        url: serverPath+"/ajax/read/loadMoreForBookList.action",
        data: "currPage="+currpage+"&pageSize="+pagesize+"&columnID="+columnID+"&allcount="+allcount+"&readlistbook_key="+readlistbook_key,
        success: function(root){
        	var html = root;
            if(html==""){
            	$("#loadMoreInfo_"+readlistbook_key).hide();
            }else{
            	$("#currPage_list_book_"+readlistbook_key).val(parseInt($("#currPage_list_book_"+readlistbook_key).val())+1);
    			$("#book_list_list_book_"+readlistbook_key).append(html);
            }
        }
 }); 
}